﻿using System;
using System.Globalization;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LocalizedSample
{
    public class Question : LocalizationBase<Question, LocalizedQuestion>
    {
        
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int QuestionId { get; set; }

        [NotMapped]
        public string Title
        {
            get { return Localizations.Current.Title; }
            set { Localizations.Current.Title = value; }
        }

    }
    
    public class LocalizedQuestion : Localization<Question>
    {
        [Key, Column(Order = 1)]
        public int TargetId { get; set; }
        public string Title { get; set; }
    }
}
